package com.wl.cloud.system.support.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: wanglin
 * @date: 2023-09-11 周一
 * @Version: 1.0
 * @Description:
 */
public class ConstantSystem {

    private static final ConstantSystem instance = new ConstantSystem();

    private ConstantSystem() {
    }

    public ConstantSystem getInstance() {
        return instance;
    }

    /**
     * 表前缀
     */
    public static final String TABLE_PREFIX = "gl_sys_";

    /**
     * 项目路径前缀
     */
//    public static String PROJECT_URL_PREFIX = "/cloud/bigdata/transfer/api/v1/sys/";
    public static final String PROJECT_URL_PREFIX = "${system.project-uri}";
    /**
     * 项目系统模块路径前缀,配置文件配置
     */
//    public static final String PROJECT_SYS_URL_PREFIX = "/cloud/bigdata/transfer/api/v1/sys/";
//    public static final String PROJECT_SYS_URL_PREFIX = "${system.project-uri}";

    /**
     * 密码至少包含：数字,字母,字符中的两种以上，长度6-16
     */
    public static final String PASSWORD_REG = "^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,16}$";
    /**
     * 重置密码
     */
    public static final String DEFAULT_PASSWORD = "wl123456";
    /**
     * 管理员
     */
    public static final String ADMIN = "ADMIN";
    public static final String SUPER_ADMIN = "SUPER_ADMIN";


    /**
     * 允许访问登录之后，访问没有配置角色的资源路径，如：getInfo,getRoutes
     */
    public static final String DEFAULT_COMMON = "DEFAULT_COMMON";

    /**
     * 资源分类
     */
    public static Map<Integer, String> UMS_RESOURCE_TYPE_LIST = new HashMap<Integer, String>() {
        {
            put(0, "后端资源");
            put(1, "前端资源");
        }
    };


    public static final String MENU_ICON = "el-icon-menu";
    public static final String MENU_LIST_ICON = "product-list";

    /**
     * 数字类型
     */
    public static final Integer INTEGER_TWO = 2;
    public static final Integer THREE = 3;
    public static final Integer FOUR = 4;


    /**
     * 菜单类型
     */
    public static Map<Integer, String> MENU_LEVE_LIST = new HashMap<Integer, String>() {
        {
            put(1, "一级");
            put(2, "二级");
            put(3, "三级");
            put(4, "四级");
            put(5, "五级");
        }
    };


    /**
     * 菜单类型（目录）
     */
    public static final String TYPE_DIR = "M";

    /**
     * 菜单类型（菜单）
     */
    public static final String TYPE_MENU = "C";

    /**
     * 菜单类型（按钮）
     */
    public static final String TYPE_BUTTON = "F";

    /**
     * Layout组件标识
     */
    public final static String LAYOUT = "Layout";

    /**
     * ParentView组件标识
     */
    public final static String PARENT_VIEW = "ParentView";

    /**
     * InnerLink组件标识
     */
    public final static String INNER_LINK = "InnerLink";

}
